/*
 *  This file is part of the SIRIUS libraries for analyzing MS and MS/MS data
 *
 *  Copyright (C) 2024 Bright Giant GmbH
 *
 *  This library is free software; you can redistribute it and/or
 *  modify it under the terms of the GNU Lesser General Public
 *  License as published by the Free Software Foundation; either
 *  version 2.1 of the License, or (at your option) any later version.
 *
 *  This library is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 *  Lesser General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License along with SIRIUS.  If not, see <http://www.gnu.org/licenses/>.
 *
 *  NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 *  https://openapi-generator.tech
 *  Do not edit the class manually.
 */


package io.sirius.ms.sdk.model;

import java.util.Objects;
import java.util.Arrays;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonTypeName;
import com.fasterxml.jackson.annotation.JsonValue;
import io.sirius.ms.sdk.model.AggregationType;
import io.sirius.ms.sdk.model.QuantMeasure;
import io.sirius.ms.sdk.model.QuantRowType;
import io.sirius.ms.sdk.model.StatisticsType;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import com.fasterxml.jackson.annotation.JsonTypeName;

/**
 * StatisticsTable
 */
@JsonPropertyOrder({
  StatisticsTable.JSON_PROPERTY_STATISTICS_TYPE,
  StatisticsTable.JSON_PROPERTY_AGGREGATION_TYPE,
  StatisticsTable.JSON_PROPERTY_QUANTIFICATION_MEASURE,
  StatisticsTable.JSON_PROPERTY_ROW_TYPE,
  StatisticsTable.JSON_PROPERTY_ROW_IDS,
  StatisticsTable.JSON_PROPERTY_COLUMN_NAMES,
  StatisticsTable.JSON_PROPERTY_COLUMN_LEFT_GROUPS,
  StatisticsTable.JSON_PROPERTY_COLUMN_RIGHT_GROUPS,
  StatisticsTable.JSON_PROPERTY_VALUES
})
@jakarta.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.14.0")
public class StatisticsTable {
  public static final String JSON_PROPERTY_STATISTICS_TYPE = "statisticsType";
  @jakarta.annotation.Nullable
  private StatisticsType statisticsType;

  public static final String JSON_PROPERTY_AGGREGATION_TYPE = "aggregationType";
  @jakarta.annotation.Nullable
  private AggregationType aggregationType;

  public static final String JSON_PROPERTY_QUANTIFICATION_MEASURE = "quantificationMeasure";
  @jakarta.annotation.Nullable
  private QuantMeasure quantificationMeasure;

  public static final String JSON_PROPERTY_ROW_TYPE = "rowType";
  @jakarta.annotation.Nullable
  private QuantRowType rowType;

  public static final String JSON_PROPERTY_ROW_IDS = "rowIds";
  @jakarta.annotation.Nullable
  private List<String> rowIds = new ArrayList<>();

  public static final String JSON_PROPERTY_COLUMN_NAMES = "columnNames";
  @jakarta.annotation.Nullable
  private List<String> columnNames = new ArrayList<>();

  public static final String JSON_PROPERTY_COLUMN_LEFT_GROUPS = "columnLeftGroups";
  @jakarta.annotation.Nullable
  private List<String> columnLeftGroups = new ArrayList<>();

  public static final String JSON_PROPERTY_COLUMN_RIGHT_GROUPS = "columnRightGroups";
  @jakarta.annotation.Nullable
  private List<String> columnRightGroups = new ArrayList<>();

  public static final String JSON_PROPERTY_VALUES = "values";
  @jakarta.annotation.Nullable
  private List<List<Double>> values = new ArrayList<>();

  public StatisticsTable() {
  }

  public StatisticsTable statisticsType(@jakarta.annotation.Nullable StatisticsType statisticsType) {
    
    this.statisticsType = statisticsType;
    return this;
  }

  /**
   * Get statisticsType
   * @return statisticsType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_STATISTICS_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public StatisticsType getStatisticsType() {
    return statisticsType;
  }


  @JsonProperty(JSON_PROPERTY_STATISTICS_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setStatisticsType(@jakarta.annotation.Nullable StatisticsType statisticsType) {
    this.statisticsType = statisticsType;
  }

  public StatisticsTable aggregationType(@jakarta.annotation.Nullable AggregationType aggregationType) {
    
    this.aggregationType = aggregationType;
    return this;
  }

  /**
   * Get aggregationType
   * @return aggregationType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public AggregationType getAggregationType() {
    return aggregationType;
  }


  @JsonProperty(JSON_PROPERTY_AGGREGATION_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setAggregationType(@jakarta.annotation.Nullable AggregationType aggregationType) {
    this.aggregationType = aggregationType;
  }

  public StatisticsTable quantificationMeasure(@jakarta.annotation.Nullable QuantMeasure quantificationMeasure) {
    
    this.quantificationMeasure = quantificationMeasure;
    return this;
  }

  /**
   * Get quantificationMeasure
   * @return quantificationMeasure
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_QUANTIFICATION_MEASURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public QuantMeasure getQuantificationMeasure() {
    return quantificationMeasure;
  }


  @JsonProperty(JSON_PROPERTY_QUANTIFICATION_MEASURE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setQuantificationMeasure(@jakarta.annotation.Nullable QuantMeasure quantificationMeasure) {
    this.quantificationMeasure = quantificationMeasure;
  }

  public StatisticsTable rowType(@jakarta.annotation.Nullable QuantRowType rowType) {
    
    this.rowType = rowType;
    return this;
  }

  /**
   * Get rowType
   * @return rowType
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ROW_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public QuantRowType getRowType() {
    return rowType;
  }


  @JsonProperty(JSON_PROPERTY_ROW_TYPE)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRowType(@jakarta.annotation.Nullable QuantRowType rowType) {
    this.rowType = rowType;
  }

  public StatisticsTable rowIds(@jakarta.annotation.Nullable List<String> rowIds) {
    
    this.rowIds = rowIds;
    return this;
  }

  public StatisticsTable addRowIdsItem(String rowIdsItem) {
    if (this.rowIds == null) {
      this.rowIds = new ArrayList<>();
    }
    this.rowIds.add(rowIdsItem);
    return this;
  }

  /**
   * Get rowIds
   * @return rowIds
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_ROW_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getRowIds() {
    return rowIds;
  }


  @JsonProperty(JSON_PROPERTY_ROW_IDS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setRowIds(@jakarta.annotation.Nullable List<String> rowIds) {
    this.rowIds = rowIds;
  }

  public StatisticsTable columnNames(@jakarta.annotation.Nullable List<String> columnNames) {
    
    this.columnNames = columnNames;
    return this;
  }

  public StatisticsTable addColumnNamesItem(String columnNamesItem) {
    if (this.columnNames == null) {
      this.columnNames = new ArrayList<>();
    }
    this.columnNames.add(columnNamesItem);
    return this;
  }

  /**
   * Get columnNames
   * @return columnNames
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COLUMN_NAMES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getColumnNames() {
    return columnNames;
  }


  @JsonProperty(JSON_PROPERTY_COLUMN_NAMES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setColumnNames(@jakarta.annotation.Nullable List<String> columnNames) {
    this.columnNames = columnNames;
  }

  public StatisticsTable columnLeftGroups(@jakarta.annotation.Nullable List<String> columnLeftGroups) {
    
    this.columnLeftGroups = columnLeftGroups;
    return this;
  }

  public StatisticsTable addColumnLeftGroupsItem(String columnLeftGroupsItem) {
    if (this.columnLeftGroups == null) {
      this.columnLeftGroups = new ArrayList<>();
    }
    this.columnLeftGroups.add(columnLeftGroupsItem);
    return this;
  }

  /**
   * Get columnLeftGroups
   * @return columnLeftGroups
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COLUMN_LEFT_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getColumnLeftGroups() {
    return columnLeftGroups;
  }


  @JsonProperty(JSON_PROPERTY_COLUMN_LEFT_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setColumnLeftGroups(@jakarta.annotation.Nullable List<String> columnLeftGroups) {
    this.columnLeftGroups = columnLeftGroups;
  }

  public StatisticsTable columnRightGroups(@jakarta.annotation.Nullable List<String> columnRightGroups) {
    
    this.columnRightGroups = columnRightGroups;
    return this;
  }

  public StatisticsTable addColumnRightGroupsItem(String columnRightGroupsItem) {
    if (this.columnRightGroups == null) {
      this.columnRightGroups = new ArrayList<>();
    }
    this.columnRightGroups.add(columnRightGroupsItem);
    return this;
  }

  /**
   * Get columnRightGroups
   * @return columnRightGroups
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_COLUMN_RIGHT_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<String> getColumnRightGroups() {
    return columnRightGroups;
  }


  @JsonProperty(JSON_PROPERTY_COLUMN_RIGHT_GROUPS)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setColumnRightGroups(@jakarta.annotation.Nullable List<String> columnRightGroups) {
    this.columnRightGroups = columnRightGroups;
  }

  public StatisticsTable values(@jakarta.annotation.Nullable List<List<Double>> values) {
    
    this.values = values;
    return this;
  }

  public StatisticsTable addValuesItem(List<Double> valuesItem) {
    if (this.values == null) {
      this.values = new ArrayList<>();
    }
    this.values.add(valuesItem);
    return this;
  }

  /**
   * Get values
   * @return values
   */
  @jakarta.annotation.Nullable
  @JsonProperty(JSON_PROPERTY_VALUES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)

  public List<List<Double>> getValues() {
    return values;
  }


  @JsonProperty(JSON_PROPERTY_VALUES)
  @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
  public void setValues(@jakarta.annotation.Nullable List<List<Double>> values) {
    this.values = values;
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    StatisticsTable statisticsTable = (StatisticsTable) o;
    return Objects.equals(this.statisticsType, statisticsTable.statisticsType) &&
        Objects.equals(this.aggregationType, statisticsTable.aggregationType) &&
        Objects.equals(this.quantificationMeasure, statisticsTable.quantificationMeasure) &&
        Objects.equals(this.rowType, statisticsTable.rowType) &&
        Objects.equals(this.rowIds, statisticsTable.rowIds) &&
        Objects.equals(this.columnNames, statisticsTable.columnNames) &&
        Objects.equals(this.columnLeftGroups, statisticsTable.columnLeftGroups) &&
        Objects.equals(this.columnRightGroups, statisticsTable.columnRightGroups) &&
        Objects.equals(this.values, statisticsTable.values);
  }

  @Override
  public int hashCode() {
    return Objects.hash(statisticsType, aggregationType, quantificationMeasure, rowType, rowIds, columnNames, columnLeftGroups, columnRightGroups, values);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class StatisticsTable {\n");
    sb.append("    statisticsType: ").append(toIndentedString(statisticsType)).append("\n");
    sb.append("    aggregationType: ").append(toIndentedString(aggregationType)).append("\n");
    sb.append("    quantificationMeasure: ").append(toIndentedString(quantificationMeasure)).append("\n");
    sb.append("    rowType: ").append(toIndentedString(rowType)).append("\n");
    sb.append("    rowIds: ").append(toIndentedString(rowIds)).append("\n");
    sb.append("    columnNames: ").append(toIndentedString(columnNames)).append("\n");
    sb.append("    columnLeftGroups: ").append(toIndentedString(columnLeftGroups)).append("\n");
    sb.append("    columnRightGroups: ").append(toIndentedString(columnRightGroups)).append("\n");
    sb.append("    values: ").append(toIndentedString(values)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }

}

